package com.jketing.entity.ams.sys;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.jketing.entity.BaseEntity;
/**
 * ExceptionInfo 导常信息实体
 * 
 * @author  李荣华
 * @version v1.0
 * @date     2011-10-08
 * @since   JDK1.6
 */
@Entity
@Table(name="ExceptionInfo_")
public class ExceptionInfo extends BaseEntity{
	private static final long serialVersionUID = -3156853634291658732L;
	/**
	 * code:错误代码
	 */
	private String  code;	
	/**
	 * exceptionClass:导常类
	 */
	private String exceptionClass;
	/**
	 * causedBy:出错原因
	 */
	private String  causedBy;
	/**
	 * errorDescribe:出错描述
	 */
	private String  errorDescribe;
	/**
	 * resolveWay:解决方案
	 */
	private String resolveWay; 
	
	/**
	 * 错误码
	 */
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	
	/**
	 * exceptionClass 导常类
	 */
	public String getExceptionClass() {
		return exceptionClass;
	}
	public void setExceptionClass(String exceptionClass) {
		this.exceptionClass = exceptionClass;
	}
	
	/**
	 * causedBy 出错原因
	 */
	public String getCausedBy() {
		return causedBy;
	}
	public void setCausedBy(String causedBy) {
		this.causedBy = causedBy;
	}
	
	/**
	 * causedBy 出错描述
	 */
	@Column(length=2000)
	public String getErrorDescribe() {
		return errorDescribe;
	}
	public void setErrorDescribe(String errorDescribe) {
		this.errorDescribe = errorDescribe;
	}
	
	/**
	 * resolveWay 解决方案
	 */
	@Column(length=2000)
	public String getResolveWay() {
		return resolveWay;
	}
	public void setResolveWay(String resolveWay) {
		this.resolveWay = resolveWay;
	}
	
	/**
	 * 	equals 判断实例是否相等
	 * 
	 * 	是本类实例并且实例id值相等返回true
	 * 	其它情况返回false
	 * 
	 * 	@param object 其它实例
	 */
	@Override
	public boolean equals(Object object) {
		if (!(object instanceof ExceptionInfo)) {
			return false;
		}
		ExceptionInfo other = (ExceptionInfo) object;
		if(!id.equals(other.id)){
			return false;
		}
		return true;
	}
}
